import React from 'react';
import MainLayout from '@/components/layout/MainLayout';
import ServiceList from '@/components/services/ServiceList';
import ChatInterface from '@/components/chat/ChatInterface';
import { useUIStore } from '@/store/ui';

const HomePage: React.FC = () => {
  const { currentView } = useUIStore();

  return (
    <MainLayout>
      {currentView === 'services' ? (
        <ServiceList />
      ) : (
        <ChatInterface 
          title="AI助手" 
          systemPrompt="你是一个专业的AI助手，请用简洁、专业的方式回答用户的问题。"
          serviceId="default"
        />
      )}
    </MainLayout>
  );
};

export default HomePage;